import javafx.scene.layout.Pane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;

public class Background {
    Pane pane;
    int[][] map=new int[20][20];


    public Background(Pane pane,int[][] map){
        this.pane=pane;
        this.map=map;
    }

    public void show(){
        for (int i=0;i<map.length;i++){
            for (int j=0;j<map[0].length;j++){
                System.out.println(i*20);
                Rectangle rectangle=new Rectangle(j*20,i*20,20,20);
                if (map[i][j]==0){
                    rectangle.setFill(Color.WHITE);
                }
                else {
                    rectangle.setFill(Color.BLACK);
                }
                pane.getChildren().add(rectangle);
            }
        }
    }
}
